<template>
  <div>
    <div id="slider" class="mui-slider">
      <div
        id="sliderSegmentedControl"
        class="mui-scroll-wrapper mui-slider-indicator mui-segmented-control mui-segmented-control-inverted"
      >
        <div class="mui-scroll">
          <a
            class="mui-control-item mui-active"
            href="#item1mobile"
            data-wid="tab-top-subpage-1.html"
          >推荐</a>
          <a class="mui-control-item" href="#item2mobile" data-wid="tab-top-subpage-2.html">热点</a>
          <a class="mui-control-item" href="#item3mobile" data-wid="tab-top-subpage-3.html">北京</a>
          <a class="mui-control-item" href="#item4mobile" data-wid="tab-top-subpage-4.html">社会</a>
          <a class="mui-control-item" href="#item5mobile" data-wid="tab-top-subpage-5.html">娱乐</a>
          <a class="mui-control-item" href="#item4mobile" data-wid="tab-top-subpage-4.html">附近</a>
          <a class="mui-control-item" href="#item5mobile" data-wid="tab-top-subpage-5.html">直播</a>
        </div>
      </div>
    </div>

    <!-- 图片列表 -->
    <ul class="photolist">
      <router-link :to="'/home/photoinfo/'+item.id" tag="li" v-for="item in allPhoto" :key="item.id">
        <img v-lazy="item.imgPath">
        <p>{{ item.info }}</p>
      </router-link>
    </ul>
  </div>
</template>

<script>
import mui from "../../lib/MUI/js/mui.min.js";

export default {
  data() {
    return {
      allPhoto: [
        {
          id: 1,
          imgPath: "../../img/1.jpg",
          info:
            "本身的v不打算v伴随哦本身的v不打算v伴随哦会失败v代表VS本身的v不打算v伴随哦会失败v代表VS本身的v不打算v伴随哦会失败v代表VS本身的v不打算v伴随哦会失败v代表VS会失败v代表VS"
        },
        {
          id: 2,
          imgPath: "../../img/2.jpg",
          info: "本身的v不打算v伴随哦会失败v代表VS"
        },
        {
          id: 3,
          imgPath: "../../img/3.jpg",
          info: "本身的v不打算v伴随哦会失败v代表VS"
        }
      ]
    };
  },
  methods: {},
  mounted() {
    mui(".mui-scroll-wrapper").scroll({
      deceleration: 0.0005 //flick 减速系数，系数越大，滚动速度越慢，滚动距离越小，默认值0.0006
    });
  }
};
</script>



<style scoped>
* {
  touch-action: pan-y;
}
img[lazy="loading"] {
  width: 320px;
  height: 320px;
  vertical-align: middle;
}
.photolist {
  padding: 10px;
  margin: 0;
}
.photolist li {
  list-style: none;
  margin-bottom: 15px;
  background: #cccccc;
  box-shadow: 0 0 9px #999;
  text-align: center;
  width: 360px;
  height: 360px;
  position: relative;
}
.photolist li p {
  color: white;
  position: absolute;
  bottom: 0px;
  background: rgba(0, 0, 0, 0.4);
  max-height: 80px;
}
</style>
